package weaver.formmode.customjavacode.modeexpand.kobelco.utils;

import weaver.conn.RecordSet;
import weaver.formmode.setup.ModeRightInfo;
import weaver.general.Util;

/**
 * @Title: ecology-idea
 * @Company: 泛微软件
 * @author: weaver.Dusongsong
 * @version: 1.0
 * @CreateDate: 2021-12-21
 * @Description: ${description}
 * @ModifyLog:
 **/

public class KobelcoUtil {
    //获取tableName
    public static String getModelTable(int tableName) {
        RecordSet rs = new RecordSet();
        rs.executeQuery( "select b.tablename from modeinfo m left join workflow_bill b on m.formid = b.id" +
                " where m.id= ?", tableName );
        rs.next();
        String tablename = Util.null2String(rs.getString( "tablename" ) );
        return tablename;
    }
    //建模权限重构
    public static void getNewModeRight(int userid, int formmodeid, int id) {
        ModeRightInfo modeRightInfo = new ModeRightInfo();
        modeRightInfo.setNewRight( true );
        modeRightInfo.editModeDataShare( userid, formmodeid, id  );
    }
}
